package com.enhe.gck.communal;

import com.enhe.gck.pojo.Material;
import com.enhe.gck.pojo.Recharge;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@Data
public class PublicEntity {

    @Data
    public static class HttpResult{
        private boolean ok;
        private String data;
    }

    @Data
    public static class Exchange{
        private BigDecimal value;
        private BigDecimal valuef;
    }

    @Data
    public static class WeightDeduction{
        private BigDecimal weight;
        private BigDecimal weightDeduction;
        private Material material;
    }
    @Data
    public static class Barcode{
        private String code;// 设置条码数据
        private int barHeight;// 设置条码高度
        private int scale;// 设置条码缩放比例
        private int size;// 设置条码大小
        private int baseline;// 设置条码基线位置
        private String altText;// 设置条码下方数字

        private boolean flagReverseY;
        private float x;
        private float y;

        public Barcode(){
            this.code="123456";
            this.barHeight=30;
            this.scale=1;
            this.size=15;
            this.baseline=15;
            this.altText="123456";
            this.x=1;
            this.y=1;
            this.flagReverseY=false;
        }
    }

    @Data
    public static class RechargeUnit{
        /**
         * 充值记录列表
         */
        private List<Recharge> list;
        /**
         * 充值记录总计可用余额
         */
        private BigDecimal availableBalanceSum;
    }


    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class NumberMoney{
        private BigDecimal number;
        private BigDecimal money;
    }
}
